The invention relates generally to storing data in a compressed format and more particularly to a method and apparatus for storing compressed texture data in a video graphics system.
Computers are used in many applications. As computing systems continue to evolve, the graphical display requirements of the computing systems become more demanding. This is especially true in applications where detailed three-dimensional graphical displays must be updated quickly. One example of such an application is a computer game where movement and modification of background images may place great demands on the processing power of the computing system.
In order to display some screen images, detailed texture maps are stored in memory. These texture maps are then filtered and adapted to overlay or map to structures, or graphics primitives, for display. An example is a brick pattern that would be mapped onto a wall structure, and if the wall is extending into the distance, the texture will be mapped in such a way as to show perspective.
In order to conserve memory storage resources and available memory bandwidth, it is often desirable to store texture maps in memory in a compressed format. In some prior art systems, texture maps are broken up into blocks and each block is compressed to a predetermined size. This type of fixed length compression allows for simple addressing of the compressed texture data, as the size of each of the compressed blocks is known. However, fixed length compression algorithms limit the level of compression that can be achieved.
In other prior art systems, variable length compression algorithms are used to compress the blocks that make up the texture map. However, because the resulting compressed texture blocks are of variable length, the memory that stores the compressed texture blocks is difficult to address. In other words, it is hard to determine where in memory a particular compressed block is stored due to the fact that the compression lengths for different blocks will vary. Allotting a large amount of space to each compressed texture block in memory may allow for a more fixed addressing scheme, but such implementations make inefficient use of memory resources and are therefore undesirable.
Therefore, a need exists for a method and apparatus for storing compressed data blocks, such as blocks of texture data, where the compression technique is a variable length technique that allows for simple addressing of memory storing the compressed texture blocks.